package com.cqh.recruit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cqh.recruit.pojo.dto.EmployeeLoginDTO;
import com.cqh.recruit.pojo.dto.MEmployeeQueryDto;
import com.cqh.recruit.pojo.entity.Employee;
import com.cqh.recruit.pojo.vo.MEmployeeListVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


/**
 * <p>
 * 员工信息表 Mapper 接口
 * </p>
 *
 * @author dh
 * @since 2025-10-18
 */
public interface EmployeeMapper extends BaseMapper<Employee> {

    /**
     * 员工登录
     * @param employeeLoginDto
     * @return
     */
    @Select("select * from employee where account= #{employeeLoginDto.account} and password= #{employeeLoginDto.password}")
    Employee login(@Param("employeeLoginDto") EmployeeLoginDTO employeeLoginDto);

    Page<MEmployeeListVo> findEmployeeByQueryDto(Page  page, @Param("employee") MEmployeeQueryDto mEmployeeQueryDto);

}
